using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using PUCIT.eFCS.DataAccess.Models.Mapping;
using System.Configuration;

namespace PUCIT.eFCS.DataAccess.Models
{
    public partial class eFCS_FinalContext : DbContext
    {
        static eFCS_FinalContext()
        {
            Database.SetInitializer<eFCS_FinalContext>(null);
        }

        public eFCS_FinalContext()
            : base(@"Data Source=.\SQLEXPRESS;Initial Catalog=eFCS_Final;Integrated Security=True")
        {
        }

        public DbSet<action> actions { get; set; }
        public DbSet<actualUser> actualUsers { get; set; }
        public DbSet<document> documents { get; set; }
        public DbSet<field> fields { get; set; }
        public DbSet<field_data> field_data { get; set; }
        public DbSet<form> forms { get; set; }
        public DbSet<section> sections { get; set; }
        public DbSet<sectionUser> sectionUsers { get; set; }
        public DbSet<sysdiagram> sysdiagrams { get; set; }
        public DbSet<user> users { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new actionMap());
            modelBuilder.Configurations.Add(new actualUserMap());
            modelBuilder.Configurations.Add(new documentMap());
            modelBuilder.Configurations.Add(new fieldMap());
            modelBuilder.Configurations.Add(new field_dataMap());
            modelBuilder.Configurations.Add(new formMap());
            modelBuilder.Configurations.Add(new sectionMap());
            modelBuilder.Configurations.Add(new sectionUserMap());
            modelBuilder.Configurations.Add(new sysdiagramMap());
            modelBuilder.Configurations.Add(new userMap());
        }
    }
}
